1 <?php
2 session_start();
3 error_reporting(
0);
4 include(
'includes/config.php');
5 if
(strlen($_SESSION['alogin'])==0)
6   {
7 header(
'location:index.php');
8 }

9 else
{
10   $iid=intval($_GET[
'iid']);
11 if
(isset($_POST['submit2']))
12   {
13 $remark=$_POST[
'remark'];
14
15 $sql =
"UPDATE tblissues SET AdminRemark=:remark WHERE id=:iid";
16 $query = $dbh->prepare($sql);
17 $query -> bindParam(
':remark',$remark, PDO::PARAM_STR);
18 $query-> bindParam(
':iid',$iid, PDO::PARAM_STR);
19 $query -> execute();
20
21 $msg=
"Remark successfully Updated";
22 }
23
24
25
26  ?>
27 <script language=
"javascript" type="text/javascript">
28 function f2()
29 {
30 window.close();
31 }ser
32 function f3()
33 {
34 window.print();
35 }
36 </script>
37 <!DOCTYPE html PUBLIC
"-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
38 <html xmlns=
"http://www.w3.org/1999/xhtml">
39 <head>
40 <meta http-equiv=
"Content-Type" content="text/html; charset=iso-8859-1" />
41 <title>Update Compliant</title>
42 <link href=
"style.css" rel="stylesheet" type="text/css" />
43 <link href=
"anuj.css" rel="stylesheet" type="text/css">
44 </head>
45 <body>
46
47 <div style=
"margin-left:50px;">
48  <form name=
"updateticket" id="updateticket" method="post">
49 <table width=
"100%" border="0" cellspacing="0" cellpadding="0">
50
51     <tr height=
"50">
52       <td colspan=
"2" class="fontkink2" style="padding-left:0px;"><div class="fontpink2"> <b>Update Remark !</b></div></td>
53       
54     </tr>
55
56
57    
58
59       <tr>
60       <td colspan=
"2" "> <?php if($error){?><div class="errorWrap"><strong>ERROR</strong>:<?php echo htmlentities($error); ?> </div><?php }
61         
else if($msg){?><div class="succWrap"><strong>SUCCESS</strong>:<?php echo htmlentities($msg); ?> </div><?php }?></td>
62     
63     </tr>
64
65             <tbody>
66 <?php
67 $sql = "
SELECT * from tblissues where id=:iid";
68 $query = $dbh -> prepare($sql);
69 $query-> bindParam(':iid',$iid, PDO::PARAM_STR);
70 $query->execute();
71 $results=$query->fetchAll(PDO::FETCH_OBJ);

72
73 if
($query->rowCount() > 0)
74 {

75 foreach
($results as $result)
76 {
77
78   
if($result->AdminRemark=="")
79   {
80 ?>
81
82      <tr style=''>
83       <td
class="fontkink1" >Remark:</td>
84       <td
class="fontkink" align="justify" ><span class="fontkink">
85         <textarea cols="
50" rows="7" name="remark" required="required" ></textarea>
86         </span></td>
87     </tr>
88     <tr>
89       <td
class="fontkink1">&nbsp;</td>
90       <td >&nbsp;</td>
91     </tr>
92     <tr>
93       <td
class="fontkink"> </td>
94       <td
class="fontkink"> <input type="submit" name="submit2" value="update" size="40" style="cursor: pointer;" /></td>
95     </tr>
96     <?php }
else { ?>
97      <tr>
98       <td
class="fontkink1" ><b>Remark:</b></td>
99       <td
class="fontkink" align="justify" ><?php echo htmlentities($result->AdminRemark);?></td>
100     </tr>
101     <tr>
102       <td
class="fontkink1" ><b>Remark Date:</b></td>
103       <td
class="fontkink" align="justify" ><?php echo htmlentities($result->AdminremarkDate);?></td>
104     </tr>
105     <?php }}}?>
106     
107  
108
109  
110 </table>
111  </form>
112 </div>
113
114 </body>
115 </html>
116 <?php } ?>
117
118      


Gõ tìm kiếm nhanh...